package com.king.mysql;

import android.content.SharedPreferences;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;

public class Main2Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        SharedPreferences sp = getSharedPreferences("info",MODE_PRIVATE);
        String name = sp.getString("name","");
        TextView textView = (TextView) findViewById(R.id.tv);
        textView.setText(name);
    }
}
